Compression technologies for moving picture data such as H.264 and Moving Picture Experts Group 4 (MPEG-4) Part 10: Advanced Video Coding (AVC) have been standardized and attracting attention. Specifically, H.264 is recommended by International Telecommunication Union-Telecommunication Standardization Sector (ITU-T). MPEG-4 Part 10: AVC is a standard by International Organization for Standardization (ISO)/International Electrotechnical Commission (IEC) Joint Technical Committee 1 (JTC1). Because H.264 and MPEG-4 Part 10: AVC are technically the same, these will be generally referred to as H.264/AVC below.
H.264 /AVC permit a picture after an Intra (I) picture to refer to a picture before the I picture. Such a picture reference is controlled by using “frame_num” and “Picture Order Count (POC)” included in a header of each picture. Each “frame_num” corresponds to a counter that counts up referenced pictures, and each “POC” corresponds to a counter that counts up a display order of pictures, and values of “frame_num” and “POC” are each continuous.
As illustrated in FIGS. 11 and 12, when a moving picture editing apparatus couples two pieces of moving picture data, for example, a picture P12 in an elementary stream ES2 is a predictive (P) picture, and thus the moving picture editing apparatus re-encodes the picture P12. That is, because a referenced picture in a forward direction is changed from a picture P11 to a picture p9, the moving picture editing apparatus re-encodes, for example, the picture P12 as an instantaneous decoding refresh (IDR) picture. Further, when the picture P12 is re-encoded as the IDR picture, values of “frame_num” and “POC” are reset to “0”. Therefore, the moving picture editing apparatus sequentially re-encodes subsequent pictures, and changes values of “frame_num” and “POC” of all the subsequent pictures.
Conventionally, as illustrated in FIG. 13, there has been proposed a method in which a moving picture editing apparatus changes headers of subsequent pictures before a next IDR picture (see Japanese Laid-open Patent Publication No. 2007-67842). Further, for example, there has been proposed a method of encoding a flag indicating that values of “frame_num” and “POC” are discontinuous (see Japanese Laid-open Patent Publication No. 2004-274732). FIGS. 11 and 12 are diagrams illustrating conventional coupling of encoded data, and FIG. 13 is a diagram illustrating conventional coupling of encoded data using an IDR picture.
In the above-mentioned conventional technologies, the headers of many pictures need to be changed at the time of coupling two pieces of moving picture data. For example, as described above, the method of changing the headers of the subsequent pictures before the next IDR picture has been proposed. However, if there is no encoded IDR picture other than the leading picture, the values of “frame_num” and “POC” of all the subsequent pictures need to be changed ultimately. There has also been proposed the method of encoding the flag indicating that values of “frame_num” and “POC” are discontinuous. However, in this method, compatibility with existing decoders may be lost.
These problems are not limited to the examples in which the moving picture editing apparatus re-encodes the picture at the coupling point as the IDR picture. For example, even when the moving picture editing apparatus re-encodes the picture at the coupling point as an I picture, because the values of “frame_num” and “POC” are already set in each moving picture data before coupling, values of “frame_num” and “POC” do not become continuous after the coupling. Thus, the moving picture editing apparatus needs to change the values of “frame_num” and “POC” of all the subsequent pictures after the coupling point.